package cn.nnxy.zentao.controller;

import cn.nnxy.zentao.domain.User;
import cn.nnxy.zentao.service.List1;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("registered")
public class RegisteredControllelt {
    @Autowired
    private List1 list1;

    @GetMapping("reg")
    public String registerUI() {
        return "register";
    }

    @PostMapping("reg2")
    public String registerUser(User user) {
        list1.queryReg(user);

        return "login.html";
    }

    @GetMapping("reg3")
    public String registerU() {
        return "login.html";
    }


}
